<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableGames extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('games', function (Blueprint $table) {
            $table->increments('game_id')->comment('游戏表主键');
            $table->char('game_name',10)->default('')->comment('游戏名称');
            $table->char('game_intro',50)->default('')->comment('游戏描述');
            $table->char('game_route',30)->default('')->comment('游戏路由');
            $table->tinyInteger('game_type')->default(0)->comment('游戏类型,0为对战,1为排行榜');
            $table->tinyInteger('game_status')->default(1)->comment('游戏状态,0为关闭,1为开启');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('games');
    }
}
